home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 21 / AACD 21.iso / AACD / System / ReqAttack / Install < prev    next >
Encoding:
Text File  |  2001-04-18  |  10.2 KB  |  403 lines

  1. ;$VER: ReqAttackPackageInstallScript 1.1 (18.04.2001) ©Jaca/Dreamolers-CAPS
  2. (set #MSG_WLCOME "Welcome to the ReqAttack 1.70 Package Installer\n©2001 by Jaca/Dreamolers-CAPS\n\nMake sure you use PatchControl from\nMCP archive!\n\nThis installer will install/update ReqAttack, RAPrefsMUI,\nCyReq and other ReqAttack\nutilities + example sound & gfx.\n\nReqAttack support page:\nhttp://republika.pl/jacadcaps")
  3. (set #MSG_DEST "Where do you wish to install ReqAttack?\nA drawer called \"ReqAttack\" will be created automatically, if not already existing!")
  4. (set #MSG_DONE "Thanks for installing ReqAttack!\n\nPlease read the ReqAttack.guide...\nPlease remove ReqOFF from your system - it's now in ReqAttack!\n\n\nAny questions ???\njacadcaps@poczta.onet.pl")
  5. (set #MSG_NOHELP "No help available. Sorry!")
  6. (set #MSG_COPY_ICON "Copying icon ...")
  7. (set #MSG_RAPATH "Where on your hard disk is your ReqAttack directory?")
  8. (set #MSG_MAKEDIR "\nCreating ReqAttack directory ...")
  9. (set #MSG_COPY_BRUSHDT "Copying ReqAttack Brush Datatype ...")
  10. (set #MSG_COPY_BRUSHDTDESC "Copying ReqAttack Brush Datatype description file ...")
  11. (set #MSG_COPY_ANIMBRUSHDT "Copying ReqAttack Animbrush Datatype ...")
  12. (set #MSG_COPY_ANIMBRUSHDTDESC "Copying ReqAttack Animbrush Datatype description file ...")
  13. (complete 0)
  14. (message #MSG_WLCOME)
  15. ;## VERSION CHECK
  16. (set #OSVERSION (/ (getversion) 65536))
  17.  
  18. (if (< #OSVERSION 39)
  19.     (abort "Sorry\nOS3.0+ required!")
  20. )
  21. ;## ASK FOR DIRECTORY
  22. (set #defdir @default-dest)
  23.         
  24. (if (= 1 (exists "S:ReqAttack.installinfo"))
  25.     (
  26.         (copyfiles
  27.             (source "S:ReqAttack.installinfo")
  28.             (dest "ENV:")
  29.             (newname "ReqAttackInstallInfo")
  30.         )
  31.         (set #envdefdir (getenv "ReqAttackInstallInfo"))
  32.         (if (<> "" #envdefdir)
  33.             (set #defdir (pathonly #envdefdir))
  34.         )
  35.         (delete "ENV:ReqAttackInstallInfo")
  36.     )
  37. )
  38. (set #dest
  39.     (expandpath
  40.         (askdir
  41.             (prompt #MSG_DEST)
  42.             (help #MSG_NOHELP)
  43.             (default #defdir)
  44.         )
  45.     )
  46. )
  47.         (if (= 0 (exists (tackon #dest "ReqAttack")))
  48.             (
  49.                 (makedir (tackon #dest "ReqAttack")
  50.                     (prompt #MSG_MAKEDIR)
  51.                     (help #MSG_NOHELP)
  52.                     (confirm)
  53.                 )
  54.                 (copyfiles
  55.                     (prompt #MSG_COPY_ICON)
  56.                     (source "/ReqAttack.info")
  57.                     (dest #dest)
  58.                     (help #MSG_NOHELP)
  59.                     (confirm)
  60.                 )
  61.                 (run ("installtools/noiconpos \"%s\"" (tackon #dest "ReqAttack")))
  62.             )
  63.         )
  64.  
  65.         (set #dest (tackon #dest "ReqAttack"))
  66.         (set @default-dest #dest)
  67.         (textfile
  68.             (dest "S:ReqAttack.installinfo")
  69.             (append #dest)
  70.         )
  71. ;##
  72. ;## ASK WHAT TO INSTALL (!!!)
  73. ;## 
  74. (set #MSG_WHAT "Select the items you want to be installed")
  75. (set #MSG_PROG "Install/Update ReqAttack & RAPrefsMUI")
  76. (set #MSG_TOOLS "Copy the ReqAttack tools")
  77. (set #MSG_DOCS "Copy documentation")
  78. (set #MSG_LOCALE "Copy catalog files")
  79. (set #MSG_GFX "Copy example gfx files")
  80. (set #MSG_SOUNDS "Copy example sounds")
  81. (set #MSG_DT "Install datatypes")
  82. (set #MSG_CR "Install CyReq")
  83. (set #WHAT_PROG 1)
  84. (set #WHAT_TOOLS 2)
  85. (set #WHAT_DOCS 4)
  86. (set #WHAT_LOCALE 8)
  87. (set #WHAT_GFX 16)
  88. (set #WHAT_SOUNDS 32)
  89. (set #WHAT_DT 64)
  90. (set #WHAT_CR 128)
  91. (set #defwhat 255)
  92. (set #what
  93.   (askoptions
  94.     (prompt #MSG_WHAT)
  95.     (choices #MSG_PROG #MSG_TOOLS #MSG_DOCS #MSG_LOCALE #MSG_GFX #MSG_SOUNDS #MSG_DT #MSG_CR)
  96.     (help "No help available")
  97.     (default #defwhat)
  98.   )
  99. )
  100. ;##
  101. ;## REQATTACK SECTION
  102. ;##
  103. (if (<> 0 (bitand #WHAT_PROG #what))
  104. (
  105.  
  106.     (copyfiles
  107.         (source "ReqAttack")
  108.         (dest #dest)
  109.         (infos)
  110.     )
  111. (set #rapc (askbool
  112.     (prompt "Where to install RAPrefsMUI")
  113.     (help "It's best to install it in SYS:Prefs")
  114.     (choices "SYS:Prefs" "ReqAttack directory")))
  115.  
  116. (if (= 1 #rapc)
  117.   (
  118.        (copyfiles
  119.           (source "RAPrefsMUI")
  120.           (dest "SYS:Prefs")
  121.           (infos)
  122.       )
  123.   )
  124. )
  125. (if (= 0 #rapc)
  126.   (
  127.        (copyfiles
  128.           (source "RAPrefsMUI")
  129.           (dest #dest)
  130.           (infos)
  131.       )
  132.   )
  133. )
  134. ))
  135. (complete 10)
  136. ;##
  137. ;## TOOLS SECTION
  138. ;##
  139. (if (<> 0 (bitand #WHAT_TOOLS #what))
  140. (
  141.   (copyfiles
  142.     (source "Tools")
  143.     (dest (tackon #dest "Tools"))
  144.     (all)
  145.   )
  146.   (copyfiles
  147.     (source "ReqReplacers")
  148.     (dest (tackon #dest "ReqReplacers"))
  149.     (all)
  150.   )
  151. ))
  152. (complete 20)
  153. ;##
  154. ;## DOCS SECTION
  155. ;##
  156. (if (<> 0 (bitand #WHAT_DOCS #what))
  157. (
  158.   (copyfiles
  159.     (source "Documentation/English/ReqAttack.guide")
  160.     (dest (tackon #dest "Documentation"))
  161.   )
  162.   (copyfiles
  163.     (source "Documentation/English/Tools.guide")
  164.     (dest (tackon #dest "Documentation"))
  165.   )
  166. ))
  167. (complete 30)
  168. ;##
  169. ;## GFX SECTION
  170. ;##
  171. (if (<> 0 (bitand #WHAT_GFX #what))
  172. (
  173.   (copyfiles
  174.     (source "AnimLogos")
  175.     (dest (tackon #dest "AnimLogos"))
  176.     (all)
  177.   )
  178.   (copyfiles
  179.     (source "Buttons")
  180.     (dest (tackon #dest "Buttons"))
  181.     (all)
  182.   )
  183.   (copyfiles
  184.     (source "Logos")
  185.     (dest (tackon #dest "Logos"))
  186.     (all)
  187.   )
  188.   (copyfiles
  189.     (source "Patterns")
  190.     (dest (tackon #dest "Patterns"))
  191.     (all)
  192.   )
  193. ))
  194. (complete 40)
  195. ;##
  196. ;## SND SECTION
  197. ;##
  198. (if (<> 0 (bitand #WHAT_SOUNDS #what))
  199. (
  200.   (copyfiles
  201.     (source "Sounds")
  202.     (dest (tackon #dest "Sounds"))
  203.     (all)
  204.   )
  205. ))
  206. (complete 50)
  207. ;##
  208. ;## LOCALE SECTION
  209. ;##
  210. (if (<> 0 (bitand #WHAT_LOCALE #what))
  211. (
  212. (set #L_WHAT "What locale files you wish to install?\nNOTE: ATO translations will be released\nin separate archives!")
  213. (set #L_PL "polski/RAPrefsMUI.catalog")
  214. (set #L_MGR "magyar/RAPrefsMUI.catalog")
  215. (set #L_CD "RAPrefsMUI.cd")
  216. (set #W_PL 1)
  217. (set #W_MGR 2)
  218. (set #W_CD 4)
  219. (set #lwhat
  220.   (askoptions
  221.      (prompt #L_WHAT)(choices #L_PL #L_MGR #L_CD)(help "Sorry, no help :(")(default 0)
  222.   )
  223. )
  224. ))
  225. (if (<> 0 (bitand #W_PL #lwhat))
  226. (
  227.   (copyfiles
  228.     (source "Catalogs/polski/RAPrefsMUI.catalog")
  229.     (dest (tackon "LOCALE:Catalogs" "polski/"))
  230.   )
  231. ))
  232. (if (<> 0 (bitand #W_MGR #lwhat))
  233. (
  234.   (copyfiles
  235.     (source "Catalogs/magyar/RAPrefsMUI.catalog")
  236.     (dest (tackon "LOCALE:Catalogs" "magyar/"))
  237.   )
  238. ))
  239. (if (<> 0 (bitand #W_CD #lwhat))
  240. (
  241.   (copyfiles
  242.     (source "Catalogs/RAPrefsMUI.cd")
  243.     (dest #dest)
  244.   )
  245. ))
  246. (complete 60)
  247. (if (<> 0 (bitand #WHAT_DT #what))
  248. (
  249.  
  250.         (copylib
  251.             (prompt #MSG_COPY_BRUSHDT)
  252.             (source "DataTypes/Classes/rabrush.datatype")
  253.             (dest   "SYS:classes/datatypes")
  254.             (confirm)
  255.             (help #MSG_NOHELP)
  256.         )
  257.         (copyfiles
  258.             (prompt #MSG_COPY_BRUSHDTDESC)
  259.             (source "DataTypes/Devs/RABrush")
  260.             (dest "DEVS:Datatypes")
  261.             (infos)
  262.             (noposition)
  263.             (confirm)
  264.             (help #MSG_NOHELP)
  265.         )
  266.         (copylib
  267.             (prompt #MSG_COPY_ANIMBRUSHDT)
  268.             (source "DataTypes/Classes/raanimbrush.datatype")
  269.             (dest   "SYS:classes/datatypes")
  270.             (confirm)
  271.             (help #MSG_NOHELP)
  272.         )
  273.         (copyfiles
  274.             (prompt #MSG_COPY_ANIMBRUSHDTDESC)
  275.             (source "DataTypes/Devs/RAAnimBrush")
  276.             (dest "DEVS:Datatypes")
  277.             (infos)
  278.             (noposition)
  279.             (confirm)
  280.             (help #MSG_NOHELP)
  281.         )
  282. ))
  283. (complete 70)
  284. ;##
  285. ;##CYREQ
  286. ;##
  287. (set #MSG_COPY_CYREQ "Copying CyReq ...")
  288. (set #MSG_FA "Now a program will be started that allows you to select at which position to insert CyReq in the Startup-Sequence. Change the predefined position only if you really know what you do!")
  289. (set #MSG_FA2 "\n\nIf CyReq is already in your Startup-Sequence you can delete the corresponding lines by using CONTROL + LEFT MOUSE BUTTON.\n\nBefore saving the changed Startup-Sequence a backup of it will be created!")
  290.  
  291. (if (<> 0 (bitand #WHAT_CR #what))
  292.     (
  293.         (set #actversion 0)
  294.         (set #installversion (getversion "Tools/CyReq"))
  295.         
  296.         (if (= 1 (exists ("C:CyReq")))
  297.             (set #actversion (getversion "SYS:c/CyReq"))
  298.         )
  299.         (if (> #installversion #actversion)
  300.             (
  301.                 (copyfiles
  302.                     (prompt #MSG_COPY_CYREQ)
  303.                     (source "Tools/CyReq")
  304.                     (dest "SYS:c")
  305.                     (help #MSG_NOHELP)
  306.                     (confirm)
  307.                 )
  308.             )
  309.         )
  310.  
  311.         (if (<> 0 (run "installtools/checkprogstart S:Startup-Sequence CyReq"))
  312.             (
  313.                 (textfile
  314.                     (dest "T:cyreq_Start")
  315.                     (append ("CyReq ;one of most important patches in your OS!\n"))
  316.                     (safe)
  317.                 )
  318.                 (message #MSG_FA #MSG_FA2)
  319.                 (run "installtools/FileAttack T:cyreq_Start S:Startup-Sequence Backup S:Startup-Sequence.bak DefaultAfter #?SetPatch#?")
  320.                 (delete "T:cyreq_Start")
  321.             )
  322.         )
  323.     )
  324. )
  325. (complete 80)
  326. ;##
  327. ;## PREFS FILES SECTION
  328. ;##
  329. (if (=(exists "ENVARC:ReqAttack.prefs" (noreq)) 1)
  330.   (if (askbool 
  331.     (prompt "\n\nInstaller has found a ReqAttack.prefs file!\n\nIf RAPrefsMUI was not used before it is\n"
  332.             "strongly recommended that you install the prefs file\nwhich comes with this archive!\n\n"
  333.             "Install the prefs file?")
  334.     (help "Sorry, no help :(")
  335.     (choices "Yes, install" "No, it's a RAPrefsMUI file")
  336.     )
  337.     (copyfiles
  338.       (source "Prefs/ReqAttack.prefs")
  339.       (dest "ENVARC:")
  340.     )
  341.   )
  342. )
  343. (if (=(exists "ENVARC:ReqAttack.prefs" (noreq)) 0)
  344.   (copyfiles
  345.     (source "Prefs/ReqAttack.prefs")
  346.     (dest "ENVARC:")
  347.   )
  348. )
  349. (complete 85)
  350. ;## OS 3.9 ICONS by Raul Silva SECTION
  351. (if (askbool
  352.       (prompt "Do you wish to install OS3.9 alternative icons\ncreated by Raul Silva ?")
  353.       (help "Original icons are in NewIcon format")
  354.       (choices "Yes, install" "No, I use NewIcons©")
  355.     )
  356. (
  357.     (copyfiles(source "Icons/ReqAttack_Drawer.info")(newname "ReqAttack.info")(dest (tackon #dest "/")))
  358.     (copyfiles(source "Icons/ReqAttack.info")(dest #dest))
  359.     (copyfiles(source "Icons/RAPrefsMUI.info")(dest #dest))
  360. )
  361. )
  362. ;##TOOLTYPE
  363. (tooltype
  364.     (dest (tackon #dest "ReqAttack"))
  365.     (settooltype "HOMEDIR" #dest)
  366. )
  367. (if (= 0 #rapc)
  368. (
  369.   (set #radest (tackon #dest "RAPrefsMUI"))
  370.   (set #MSG_RAPATH "If you run RA from startup-sequence be sure to set raprefspath argument\nlike RA icon's tooltype")
  371.   (message #MSG_RAPATH)
  372. (tooltype
  373.     (dest (tackon #dest "ReqAttack"))
  374.     (settooltype "RAPREFSPATH" (tackon #dest "RAPrefsMUI"))
  375. )
  376. ))
  377. (complete 90)
  378. ;##WBSTARTUP
  379. (if (askbool
  380.       (prompt "Do you wish to make a copy of ReqAttack in WBStartup?")
  381.       (help "By default ReqAttack is not installed after\nyou run this installation script")
  382.       (choices "Yes, install!" "No, I'll install RA myself")
  383.     )
  384. (
  385.   (copyfiles
  386.     (source (tackon #dest "ReqAttack"))
  387.     (dest "SYS:WBStartup")
  388.     (infos)
  389.   )
  390. ))
  391. (complete 95)
  392. (set #MSG_NOPOPUP "You don't have popupmenu.library v 9+\nInstall it to activate extra features!\n\nAminet: util/misc/pmuser.lha")
  393. (set #MSG_BETTERSTRING "You don't have the BetterString.mcc MUI class\n\nYou'll find it on\nhttp://www.diku.dk/students/duff/BetterString/\n\nNOTE: RAPrefsMUI 1.76 will work without it!")
  394. (if (=(exists "libs:popupmenu.library" (noreq)) 1)(set #libver (/ (getversion "libs:popupmenu.library") 65536)))
  395. (if (=(exists "libs:popupmenu.library" (noreq)) 0)(set #libver 0))
  396. (if (< #libver 9)
  397.    (message #MSG_NOPOPUP)
  398. )
  399. (if (=(exists "libs:mui/betterstring.mcc" (noreq)) 0)(message #MSG_BETTERSTRING))
  400. (complete 100)
  401. (run "Multiview RAPreview.jpg")
  402. (exit #MSG_DONE (quiet))
  403.